import { exInputNumber, exSwitch } from '@ve/common/components/extension'
import { exInput } from '../../extension/index'
export default {
  VERSION: '20220408',
  type: 'uiGantt',
  name: '甘特图',
  icon: 'checkbox-blank-line',
  svg: 'gantetu',
  extension: {
    requestSet: {
      type: 'exRequestSet',
      name: '接口配置',
      value: {
        api: '/wms/wms-web',
        method: 'wms.screen.query.test',
        getDataKey: 'wms.screen.query.test',
        cardValue: 'EDITWHO',
        isCard: true,
        loopRequest: false,
        loopTime: 3000,
        nameKey: '',
        valueKey: '',
        busList: [],
        dataObj: {},
        data: [
          { key: '#LIMIT#', value: '1' },
          { key: '#PAGE_SIZE#', value: '10' },
        ],
        resList: [],
      },
    },
    firstGetData: exSwitch('首次获取数据', true),
    height: exInputNumber('高度', 100, 1, 10000),
    padding: {
      type: 'exInputNumber',
      name: '内边距',
      value: 1,
      min: 0,
      max: 12,
    },
    topMargin: {
      type: 'exInputNumber',
      name: '上外边距',
      value: 0,
    },
    rightMargin: {
      type: 'exInputNumber',
      name: '右外边距',
      value: 0,
    },
    bottomMargin: {
      type: 'exInputNumber',
      name: '下外边距',
      value: 0,
    },
    leftMargin: {
      type: 'exInputNumber',
      name: '左外边距',
      value: 0,
    },
    spanceDate: exInputNumber('间隔', 1, 1, 100),
    startTime: {
      type: 'exSelectTime',
      name: '起始时间',
      value: '08:00',
    },
    endTime: {
      type: 'exSelectTime',
      name: '终止时间',
      value: '18:00',
    },
    backgroundColor: {
      type: 'exSetChartColor',
      name: '默认颜色',
      value: '#999',
    },
    statusProps: exInput('状态props', 'status'),
    fontSize: exInputNumber('字体大小', 15, 1, 100),
    fontSize2: exInputNumber('下标字体大小', 15, 1, 100),
    spanceBetween: exInputNumber('间距', 40, 1, 1000),
    statusList: {
      type: 'exSetGanttStatus',
      name: '设置状态',
      value: [
        { statusValue: 1, statusColor: '#f00', name: '报警' },
        { statusValue: 2, statusColor: '#f00', name: '运行' },
        { statusValue: 3, statusColor: '#f00', name: '空闲' },
        { statusValue: 4, statusColor: '#000', name: '关机' },
      ],
    },
  },
  list: [],
  interaction: [],
}
